package com.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.api.R;
import com.entity.Response;
import com.entity.pojo.LfCaseType;
import com.mapper.LfCaseTypeMapper;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/caseType")
public class CaseTypeController {

    @Resource
    private LfCaseTypeMapper caseTypeMapper;

    @GetMapping
    public Response listCaseType() {
        List<LfCaseType> lfCaseTypeList = caseTypeMapper.selectList(new QueryWrapper<LfCaseType>().eq("deleted", 0));
        return new Response().setSuccess().appendMsg("list", lfCaseTypeList);
    }
}
